from tkinter import *


root = Tk()
root.geometry("500x500")

n = 7

canvas =  Canvas(bg="white", width=500, height=500)
canvas.pack(anchor=CENTER, expand=1)

canvas.create_rectangle(40 * n, 30 * n, 20 * n, 10 * n, fill="blue", outline="black")
canvas.create_rectangle(40 * n, 30 * n, 20 * n, 50 * n, fill="blue", outline="black")
root.mainloop()
